<#assign tit>修改客诉</#assign>
<@page.html title=tit>
<style>table.list th, table.list td {padding:2px;}</style>
<script type="text/javascript" src="${_appPath!}/js/upload.js"></script>
<script type="text/javascript">
  function uploadSucc(f) {
    var td = getEl("td_img");
    if(td) {
      var sp = document.createElement("SPAN");
      td.appendChild(sp);
      sp.innerHTML = '<img src="${_picPath!}'+ f.furl+'" style="max-width:220px;"/>';
    }
    var ipt = getEl("ipt_pics");
    ipt.value = ipt.value + (ipt.value!=""?",":"") + f.furl;
  }
</script>
<div style="width:750px;">
  <div class="kbox">
    <form id="fm_input" method="post" action="_edit" onsubmit="return post(this);">
      <input type="hidden" name="complainId" value="${complaint.complainId!}">
      <input type="hidden" name="picUrls" id="ipt_pics" value="${complaint.picUrls!}">
      <table class="info">
        <tr>
          <th width="85">客诉门店</th>
          <td width="200"><@value type="shopName" key="${complaint.shopCode!}"/></td>
          <#if earnest?? && (!complaint.memberCode?? || complaint.memberCode?length=0)>
          <th width="85">定金号</th>
          <td width="250">${earnest.saleId!}</td>
          <#else>
          <th width="85">会员编号</th>
          <td width="250">${complaint.memberCode!}</td>
          </#if>
        </tr>
        <tr>
          <th>会员姓名</th>
          <td><a href="javascript:mbinfo('${complaint.memberCode!}');">${member.chName!}</a></td>
          <th>会员卡号</th>
          <td>${member.cardCode!}</td>
        </tr>
        <tr>
          <th>证件号</th>
          <td colspan="3"><@value type="idType" key="${member.idType!}"/> ${member.idNumber!}</td>
        </tr>
        <tr>
          <th>手机号码</th>
          <td>${member.mobile!}</td>
          <th>所属门店</th>
          <td><@value type="shopName" key="${member.shopCode!}"/></td>
        </tr>
      </table>
      <#if contractList??>
        <table class="list" style="width:700px;">
          <tr>
            <th>门店</th>
            <th>合同号</th>
            <th>合同类型</th>
            <th>销售类型</th>
            <th>课程/卡种</th>
            <th>金额</th>
            <th>开始日期</th>
            <th>结束日期</th>
            <th>剩余次数</th>
          </tr>
          <#list contractList as c>
            <tr<#if c_index%2==1> class="line2"<#else> class="line1"</#if>>
              <td>${c[0]!}</td>
              <td>${c[1]!}</td>
              <td>${c[2]!}</td>
              <td>${c[3]!}</td>
              <td>${c[4]!}</td>
              <td>${c[5]!}</td>
              <td>${c[6]!}</td>
              <td>${c[7]!}</td>
              <td>${c[8]!}</td>
            </tr>
          </#list>
        </table>
      </#if>
      <table class="info">
        <tr>
          <th width="85">客诉分类</th>
          <td width="200"><@value type="complaintType" key="${complaint.type!}"/></td>
          <th width="85">紧急程度</th>
          <td width="250"><@value type="complaintPriority" key="${complaint.priority!}"/></td>
        </tr>
        <tr>
          <th>客诉标题</th>
          <td colspan="3">${complaint.title!}</td>
        </tr>
        <tr>
          <th>诉求记录</th>
          <td width="550" colspan="3">${complaint.content!}</td>
        </tr>
      </table>
      <table class="input w4" style="margin-left:25px;">
        <tr>
          <th>处理分类</th>
          <td><select name="procType" req="处理分类"><option value=""></option><#if complaintProcType??><#list complaintProcType as t><option value="${t.id}"<#if complaint.procType?? && complaint.procType=t.id> selected</#if>>${t.name}</option></#list></#if></select></td>
          <th>投诉原因</th>
          <td><select name="complainReason" req="投诉原因"><option value=""></option><#if complainReason??><#list complainReason as t><option value="${t.id}"<#if complaint.complainReason?? && complaint.complainReason=t.id> selected</#if>>${t.name}</option></#list></#if></select></td>
        </tr>
        <tr>
          <th>风险金扣除</th>
          <td colspan="3"><input type="text" name="riskMoney" value="${complaint.riskMoney!}" size="40" maxlength="200" class="w2"></td>
        </tr>
      </table>
    </form>
    <table class="input" style="margin-left:25px;">
      <tr>
        <th width="85">上传图片</th>
        <td><form id="fm_upload" action="../customerComplaint/_upload" method="post" enctype="multipart/form-data" target="ifm_upload">
          <input type="file" name="file" id="ip_file" size="22" /> <input type="button" class="opwin" value="上传" onclick="chkupload();"></form>
          <iframe name="ifm_upload" onload="uploadOk(this);" style="width:0px; height:0px; display:none;"></iframe>
          <div id="div_wait" style="position:absolute; display:none; border:1px solid #999; top:-5px; left:50px; background-color:#fffff0; padding:12px 50px;"><span class="loading">正在上传，请稍等。。。</span></div></td>
      </tr>
      <tr>
        <th></th>
        <td id="td_img"><#if picList??><#list picList as c>
          <span><img src="${_picPath!}${c!}" style="max-width:220px; cursor:pointer;" onclick="window.open(this.src);"/></span>
        </#list></#if></td>
      </tr>
    </table>
  </div>
  <div class="button"><input type="button" value="提 交" onclick="post(getEl('fm_input'));"></div>
</div>
</@page.html>